<!doctype html>
<html> 
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的激活码_win</title>
 <!--   <link rel="stylesheet" type="text/css" href="./css/api.css"/> 

    <link rel="stylesheet" type="text/css" href="./css/iconfont.css"> -->
	
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>

    <style>
		html,body {height:100%;background-color:#fff; }
		.hover{ opacity: .8; }
		.flex-wrap{ display: -webkit-box;	display: -webkit-flex;	display: flex; }
		.flex-con{     -webkit-box-flex: 1;     -webkit-flex: 1;    flex: 1; font-size:12px;color: #543e3e;}
		.flex-vertical{ -webkit-box-orient: vertical;-webkit-flex-flow: column;flex-flow: column;}
		#wrap{ height: 100%;}
        header{ background: linear-gradient(to right,#f370af 0,#5515ee 100%); } 
        header ul li { height: 44px; line-height: 44px; text-align: center; display: none; color: #fff; position: relative;font-size: 0.9rem;  }
        header ul li.active{ display: block; }


.flex-con{
          overflow: auto;
          background-color:#fff;
        }
		
		
		
	.aui-navBar {
    height: 44px;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    z-index: 1002;
    background: #f6f6f6;
}
	
.tab-nav {
    height: 44px;
    line-height: 44px;
    display: block;
    position: relative;
    background: #fff;
    z-index: 1;
    width: 100%;
    margin: 0 auto;
}


.tab-nav-item.tab-active:before {
    content: '';
    width: 20%;
    height: 3px;
    position: absolute;
    left: 50%;
    bottom: 0;
    margin-left: -10%;
    z-index: 4;
    background-image: -webkit-gradient(linear,left top,right top,from(#ff6143),to(#ff1767));
    background-image: -webkit-linear-gradient(left,#ff6143,#ff1767);
    background-image: -moz-linear-gradient(left,#ff6143,#ff1767);
    background-image: linear-gradient(to right,#ff6143,#ff1767);
    background-color: #ff6143;
}


#father{
  display:flex;
  width:100%;
  height:10rem;
}


.tab-nav-item {
    height: 44px;
    line-height: 44px;
    position: relative;
    text-align: center;
    color: #585858;
    font-size: 0.9rem;
    display: block;
    float: left;
 /*   width: 33%;    */
	flex:1;
  text-align:center;
}



.tab-nav-item.tab-active {
    /* background-color: #51bd03; */
}

.tab-nav-item.tab-active a {
    color: #ff1767;
    font-size: 0.6rem;
}

.tab-nav-item a {
    display: inherit;
    font-size: 0.6rem;
    color: #666;
}
.aui-navBar {
    height: 44px;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    z-index: 1002;
    background: #fff;
}		
.b-line:after {
    content: '';
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    width: 100%;
    border-bottom: 1px solid #e2e2e2;
    -webkit-transform: scaleY(0.5);
    transform: scaleY(0.5);
    -webkit-transform-origin: 0 100%;
    transform-origin: 0 100%;
}		








.aui-flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 8px  15px 5px 15px;
    position: relative;
	background: #fff;
}


.aui-flex-box {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #333;
}

.aui-head-user {
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 100%;
    float: left;
}
.aui-head-user img {
    width: 100%;
    height: auto;
    display: block;
    border: 0;
}

.aui-head-title {
    float: left;
}

.aui-head-title h2 {
    color: #333333;
    font-size: 0.6rem;
    line-height: 25px;
    padding-left: 0.3rem;
}


.aui-head-title h2 em {
    background: #000;
    color: #fff;
    font-style: normal;
    font-weight: normal;
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.aui-icon-box {
    overflow: hidden;
    font-size: 0.7rem;
}

.aui-icon-box em {
    font-style: normal;
    float: left;
    margin-left: 1.5rem;
}

.icon {
    width: 20px;
    height: 20px;
    display: block;
    border: none;
    float: left;
    background-size: 20px;
    background-repeat: no-repeat;
}

.icon-zun {
    background-image: url();
}


.icon-cio {
    background-image: url();
}






    </style>

</head>
<body>



<div id="wrap" class="flex-wrap flex-vertical">
    <header>
        <ul>

            <li class="border-b active" > 
			<img src="" style="position: absolute;width: 1rem;top: 0.6rem;left: 0.5rem;" onclick="toHelp()">
			我的激活码  
			<img src="" style="position: absolute;width: 1rem;top: 0.6rem;right: 0.5rem;" onclick="toShezhi()"> </li>
  </ul>
  

  
  <span class="aui-navBar aui-navBar-fixed" id="Tabs">
           <!--     <ul class="tab-nav b-line"  id="father">
                    <li class="tab-nav-item tab-active"  id="zero">
                        <a>
                            <span>有效</span>
                        </a>
                    </li>
                    <li class="tab-nav-item"   id="one">
                        <a>
                            <span>已用</span>
                        </a>
                    </li>
					
					
                    <li class="tab-nav-item"   id="two">
                        <a>
                            <span>查询</span>
                        </a>
                    </li>
					

					
                </ul>  -->
   </span>

  
    </header>





    <div id="main" class="flex-con">    </div>


</div>


</body>
</html>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/doT.js"></script>
<script type="text/javascript">
    var api_url = localStorage.getItem('api_url');
    apiready = function () {



        $api.fixStatusBar( $api.dom('header') );
		
		
        api.setStatusBarStyle({
            style: 'dark',
            color: 'rgba(0,0,0,0)'
        });
		

	
	
			var tabs_frm = $api.byId('Tabs');//TAB列表
			if(localStorage.getItem('power') < 2){
					//展示全部
					var html= ' <ul class="tab-nav b-line"  id="father">  '+

					' 	 <li class="tab-nav-item tab-active"  id="zero"><a><span>有效</span></a></li> '+      
					' 	<li class="tab-nav-item"   id="one"><a><span>已用</span></a></li>  '+
					' 	<li class="tab-nav-item"   id="two"><a><span>查询</span></a></li>  '+
					' </ul> ';
			}else{
					//隐藏 查询
					var html= ' <ul class="tab-nav b-line"  id="father">  '+

					' 	 <li class="tab-nav-item tab-active"  id="zero"><a><span>有效</span></a></li> '+      
					' 	<li class="tab-nav-item"   id="one"><a><span>已用</span></a></li>  '+
			//		' 	<li class="tab-nav-item"   id="two"><a><span>查询</span></a></li>  '+
					' </ul> ';		
			}

 
							
			$api.append(tabs_frm,html);














        funIniGroup();
		
		
		
			// 网络状态
		api.addEventListener({
			name:'offline'
		}, function(ret, err){        

			api.toast({
			msg : '网络连接异常',
			duration : 5000,
			location : 'middle' 
			});

			  

		});

		api.addEventListener({
			name:'online'
		}, function(ret, err){        
		
			  api.toast({
			  msg : '已经连接网络',
			  duration : 2000,
			  location : 'middle' 
			  });
				  

     funIniGroup();

				  
		});
	

		$api.fixStatusBar( $api.byId('header') );

    }




    function funIniGroup(){
	
			
			
		if(localStorage.getItem('power') < 2){
		
			var eHeaderLis = $api.domAll('header li'),
            frames = [];

					//指定

					frames[0]={	
                            name: 'gokalog_effective_frm',		//有效
                            url: './gokalog/gokalog_effective_frm.html',    
							bgColor:'#fff',    //（可选项）背景色，支持图片和颜色，格式为#fff、#ffffff、rgba(r,g,b,a)等，图片路径支持fs://、widget://等APICloud自定义文件路径协议，同时支持相对路径
                            bounces:false     //（可选项）是否弹动，布尔型，默认值：若在 config.xml 里面配置了pageBounce，则默认值为配置的值，否则为true。注意如果页面使用了上拉、下拉刷新等功能，该属性可能会被刷新组件重新设置。
							
                        };
                    frames[1]={
                            name: 'gokalog_Invalid_frm',    	//已用
                            url: './gokalog/gokalog_Invalid_frm.html',
							bgColor:'#fff',    //（可选项）背景色，支持图片和颜色，格式为#fff、#ffffff、rgba(r,g,b,a)等，图片路径支持fs://、widget://等APICloud自定义文件路径协议，同时支持相对路径
                            bounces:false     //（可选项）是否弹动，布尔型，默认值：若在 config.xml 里面配置了pageBounce，则默认值为配置的值，否则为true。注意如果页面使用了上拉、下拉刷新等功能，该属性可能会被刷新组件重新设置。
							
                    };
                    frames[2]={
                            name: 'activation_search_frm',  	//查询
                            url: './gokalog/activation_search_frm.html',
                            bgColor : 'rgba(255,255,255,0)',
                            bounces:false
                    };
					
	



        api.openFrameGroup({
            name: 'group',
            scrollEnabled: true,        //  这里  false  禁止左右滑动    true 可以 
			
			
         //   preload : 0,  //数据加载未完成时，加载动画
            rect: {
                x: 0,
                y: $api.dom('header').offsetHeight,
                w: api.winWidth,
                h: $api.dom('#main').offsetHeight
            },
            index: 0,
            frames: frames
        }, function (ret, err) {


		if(ret.index ==0){
		
									var obj = document.getElementById("zero");
									obj.setAttribute("class", "tab-nav-item tab-active");
									
									var obj = document.getElementById("one");
									obj.setAttribute("class", "tab-nav-item");
									
									var obj = document.getElementById("two");
									obj.setAttribute("class", "tab-nav-item");
									

		}else if(ret.index ==1){
		
									var obj = document.getElementById("zero");
									obj.setAttribute("class", "tab-nav-item");
									
									var obj = document.getElementById("one");
									obj.setAttribute("class", "tab-nav-item tab-active");
									
									var obj = document.getElementById("two");
									obj.setAttribute("class", "tab-nav-item");
									
		
		}else if(ret.index ==2){
									var obj = document.getElementById("zero");
									obj.setAttribute("class", "tab-nav-item");
									
									var obj = document.getElementById("one");
									obj.setAttribute("class", "tab-nav-item");
									
									var obj = document.getElementById("two");
									obj.setAttribute("class", "tab-nav-item tab-active");
									
		
		}


// alert( JSON.stringify( ret.index ) );




        });
				
					
					
					
					

		}else{
		
		
			var eHeaderLis = $api.domAll('header li'),
            frames = [];

					//指定

					frames[0]={	
                            name: 'gokalog_effective_frm',		//有效
                            url: './gokalog/gokalog_effective_frm.html',    
							bgColor:'#fff',    //（可选项）背景色，支持图片和颜色，格式为#fff、#ffffff、rgba(r,g,b,a)等，图片路径支持fs://、widget://等APICloud自定义文件路径协议，同时支持相对路径
                            bounces:false     //（可选项）是否弹动，布尔型，默认值：若在 config.xml 里面配置了pageBounce，则默认值为配置的值，否则为true。注意如果页面使用了上拉、下拉刷新等功能，该属性可能会被刷新组件重新设置。
							
                        };
                    frames[1]={
                            name: 'gokalog_Invalid_frm',    	//已用
                            url: './gokalog/gokalog_Invalid_frm.html',
							bgColor:'#fff',    //（可选项）背景色，支持图片和颜色，格式为#fff、#ffffff、rgba(r,g,b,a)等，图片路径支持fs://、widget://等APICloud自定义文件路径协议，同时支持相对路径
                            bounces:false     //（可选项）是否弹动，布尔型，默认值：若在 config.xml 里面配置了pageBounce，则默认值为配置的值，否则为true。注意如果页面使用了上拉、下拉刷新等功能，该属性可能会被刷新组件重新设置。
							
                    };





					api.openFrameGroup({
						name: 'group',
						scrollEnabled: true,        //  这里  false  禁止左右滑动    true 可以 
						
						
					 //   preload : 0,  //数据加载未完成时，加载动画
						rect: {
							x: 0,
							y: $api.dom('header').offsetHeight,
							w: api.winWidth,
							h: $api.dom('#main').offsetHeight
						},
						index: 0,
						frames: frames
					}, function (ret, err) {


					if(ret.index ==0){
					
												var obj = document.getElementById("zero");
												obj.setAttribute("class", "tab-nav-item tab-active");
												
												var obj = document.getElementById("one");
												obj.setAttribute("class", "tab-nav-item");
												
												

					}else if(ret.index ==1){
					
												var obj = document.getElementById("zero");
												obj.setAttribute("class", "tab-nav-item");
												
												var obj = document.getElementById("one");
												obj.setAttribute("class", "tab-nav-item tab-active");
												
												
					
					}


			// alert( JSON.stringify( ret.index ) );




					});

		}	


    }





    function toHelp(){


						api.openWin({
						name: 'help_win',
						url: 'widget://html/help_win.html',
				//	delay: 300,
											
						
				bounces: false,
				slidBackEnabled: true,
				bgColor: '#fff',
				animation: {
					type: "fade", //动画类型（详见动画类型常量） 
					subType: "from_top", //动画子类型（详见动画子类型常量）
				//	duration: 400
				},
				vScrollBarEnabled: false
						
					
					
				});		

    }





    function toShezhi(){


        api.openWin({
            name: 'shezhi_win',
            url: 'widget://html/shezhi_win.html', 
        });
		


    }











</script>
